{% extends "element/saas/statistics/statistics_base.html" %}

{% block meta_title %}月度晴雨表{% endblock %}

{% block htmlcss %}{% endblock %}

{% block chart %}{% endblock %}

{% block sx %}
    <div id="pietype">
        <span class="ptype c0">新增企业数</span>
        <span class="ptype c4 inactive">注销企业数</span>
        <span class="ptype c3 inactive">吊销企业数</span>
        <span class="ptype c2 inactive">新增个体数</span>
        <span class="ptype c1 inactive">注销个体数</span>
        <span class="ptype c5 inactive">吊销个体数</span>
    </div>
{% endblock %}

{% block table %}
    <h4 class="report-title" id="monthText">月度晴雨表</h4>
    <table class="basictable" id="monthTable"></table>
{% endblock %}

{% block comlist %}{% endblock %}

{% block htmljs %}
    <script>
        $(function () {
            ajaxchart("", "");
        });
        slengedtext = "新增企业数", maplegendtext = "新增企业数", tablehead = "entmonth";
        //ajax
        function ajaxchart(region, nic, maptype, date) {
            $("#chartloading").show();
            if (!date) {
                date = "";
            }
            maptype = jQuery.parseJSON(json1)[maptype];
            $.ajax({
                type: 'POST',
                url: '/saas/statistics_entmonth/',
                data: {
                    region: region,
                    nic: nic,
                    tmonth: date
                },
                async: false,
                success: function (data) {
                    chartautoSize(0);
                    drawhighstock(data, maptype);
                }
            });
            $("#chartloading").hide();
        }
    </script>
{% endblock %}
